import { CanDeactivate } from "@angular/router";
import { HomeComponent } from "../home/home.component";

export class UnsavedGuard implements CanDeactivate<HomeComponent> {
  canDeactivate(component: HomeComponent){
    if (window.confirm("您的表单保存了吗？")) {
      return true;
    };
  }
}
